using System.ComponentModel;
using Triton.Common;

namespace Triton.Bot.Settings
{
	public class DevSettings : JsonSettings
	{
		private static DevSettings devSettings_0;

		private string string_1;

		private string string_2;

		private string string_3;

		private string string_4;

		public static DevSettings Instance => devSettings_0 ?? (devSettings_0 = new DevSettings());

		private string currAccountHashCode;
		[DefaultValue("")]
		public string CurrAccountHashCode
		{
			get
			{
				return currAccountHashCode;
			}
			set
			{
				if (!value.Equals(currAccountHashCode))
				{
					currAccountHashCode = value;
					NotifyPropertyChanged(() => CurrAccountHashCode);
					Save();
				}
			}
		}

		[DefaultValue("")]
		public string FileName
		{
			get
			{
				return string_1;
			}
			set
			{
				if (!value.Equals(string_1))
				{
					string_1 = value;
					NotifyPropertyChanged(() => FileName);
				}
			}
		}

		[DefaultValue("System.dll\r\nSystem.Core.dll\r\nHearthbuddy.exe\r\nlog4net.dll\r\ngreymagic.dll")]
		public string Assemblies
		{
			get
			{
				return string_2;
			}
			set
			{
				if (!value.Equals(string_2))
				{
					string_2 = value;
					NotifyPropertyChanged(() => Assemblies);
				}
			}
		}

		[DefaultValue("RuntimeCode")]
		public string ClassName
		{
			get
			{
				return string_3;
			}
			set
			{
				if (!value.Equals(string_3))
				{
					string_3 = value;
					NotifyPropertyChanged(() => ClassName);
				}
			}
		}

		[DefaultValue("using Triton.Common;\r\nusing Triton.Game;\r\nusing Triton.Bot;\r\nusing log4net;\r\nusing Logger = Triton.Common.LogUtilities.Logger;\r\n\r\npublic class RuntimeCode\r\n{\r\n\tprivate static readonly ILog Log = Logger.GetLoggerInstanceForType();\r\n\r\n\tpublic void Execute()\r\n\t{\r\n\t\tusing(TritonHs.AcquireFrame())\r\n\t\t{\r\n\t\t\tLog.DebugFormat(\"Hello World!\");\r\n\t\t}\r\n\t}\r\n}")]
		public string Code
		{
			get
			{
				return string_4;
			}
			set
			{
				if (!value.Equals(string_4))
				{
					string_4 = value;
					NotifyPropertyChanged(() => Code);
				}
			}
		}

		public DevSettings()
			: base(JsonSettings.GetSettingsFilePath(Configuration.Instance.Name, string.Format("{0}.json", "Dev")))
		{
		}
	}
}
